<template>
    <div class="scpage animated slideInRight" :style="{minHeight:winheight+'px'}">
        <div>
            <h2>{{myname}}</h2><br>
            <p>{{msg}}</p>
            <h2>{{youname}}</h2>
            <!-- <audio src="/static/MP3/Twins-Jingle-Bells.mp3" autoplay="autoplay"></audio> -->
            <!-- <a-player autoplay :music="{
              title: '平安夜快乐',
               author: ' ',
              url: '/static/MP3/Twins-Jingle-Bells.mp3',
              pic: 'http://devtest.qiniudn.com/Preparation.jpg',
              lrc: '[00:00.00]lrc here\n[00:01.00]aplayer',
              autoplay:true,
              narrow:true,
              showlrc:1
            }"></a-player> -->
        </div>
        <!-- <span class="mys"><a>我也要送</a></span> -->
    </div>
</template>

<script type="text/ecmascript-6">
    import VueAplayer from 'vue-aplayer'
    import router from '../router/index'
    export default {
        data() {
            return {
                winheight: window.innerHeight,
                myname: '',
                youname: '',
                msg: ''
            }
        },
        components: {
            'a-player': VueAplayer
        },
        mounted() {
            let that = this;
            let sjs = Math.floor(Math.random() * 5 + 1);
            if (sjs == 1) {
                // alert(sjs)
                $('.scpage').css({
                    "backgroundImage": "url('/static/images/scbg.jpg')"
                });
            }
            if (sjs == 2) {
                $('.scpage').css({
                    "backgroundImage": "url('/static/images/scbg1.jpg')"
                });
            }
            if (sjs == 3) {
                $('.scpage').css({
                    "backgroundImage": "url('/static/images/scbg2.jpg')"
                });
            }
            if (sjs == 4) {
                $('.scpage').css({
                    "backgroundImage": "url('/static/images/scbg3.jpg')"
                });
            }
            if (sjs == 5) {
                $('.scpage').css({
                    "backgroundImage": "url('/static/images/scbg4.jpg')"
                });
            }
            that.myname = this.$route.params.youname;
            that.youname = this.$route.params.toname;
            that.msg = this.$route.params.msg;
            $('title').html("嘿！" + that.myname + "你收到了一个来自" + that.youname + "平安果！")
        },
        created() {}
    }
</script>

<style scoped>

</style>
